package com.ruoyi.tiktok.service;

import com.ruoyi.tiktok.domain.Video;
import com.ruoyi.tiktok.mapper.VideoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VideoService {
    @Autowired
    private VideoMapper videoMapper;

    public void createVideo(Video video) {
        videoMapper.insertVideo(video);
    }

    public void updateVideo(Video video) {
        videoMapper.updateVideo(video);
    }

    public void deleteVideo(String videoId) {
        videoMapper.deleteVideo(videoId);
    }

    public Video getVideoById(String videoId) {
        return videoMapper.getVideoById(videoId);
    }
}

